<?php

	class Screen extends _smuoiUserInterface{

		var $title = '';
		
		var $descr = '';

		function __construct(){
			$this->public_resources_link(SMERNEL_PATH.'/Resources/@public', DSK_ROOT.'/@public/smrnl/'.SMERNEL);
		}
		
		function incpath($file){
			return SMERNEL_PATH.'/'.$file;
		}	
		
		function file_uri($filename, $sub=''){
			return SHR."/smrnl/".SMERNEL."$sub/$filename";
		}
		
		function title(){
			return (($this->title) ? $this->title.' &middot; ' : '' ) . parent::title();	
		}
		
		function description(){
			return $this->descr;	
		}
		
		function intervene(){
			Desktop()->APP = $this;
			OB()->chrome_wrappers = false;	
		}
		
		function run_login(){
			$this->intervene();
			$this->run_screen('login');
			exit;
		}
		
		function run_error($message){
			$this->intervene();
			$this->e_message = $message;
			$this->run_screen('error');
			exit;
		}
		
		function run(){
			$this->intervene();
			if($fmrp = get('fmrp')) sm_chdir($fmrp);
			$this->run_screen('terminal');
			exit;	
		}
	
	}


